﻿<%@page pageEncoding="utf-8" %>
<%@include file="/util/tag.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <%@include file="../common/head.jsp"%>
    
    <body onload="initialYearAndMonth();">
        <%@include file="../common/top.jsp"%>
        
        <div id="main">
            <form action="" method="">
                <!--查询-->
                <div class="search_add">                        
                    <div>账务账号：<span class="readonly width70">${bill.account.loginName}</span></div>                            
                    <div>OS 账号：<span class="readonly width100">${billItem.osUsername}</span></div>
                    <div>服务器 IP：<span class="readonly width100">${billItem.hostIp}</span></div>
                    <div>计费时间：<span class="readonly width70"><s:property value="bill.toBillMonth()"/></span></div>
                    <div>费用：<span class="readonly width70">${billItem.cost}</span></div>
                    <input type="button" value="返回" class="btn_add" onclick="history.go(-1);" />
                </div>  
                <!--数据区域：用表格展示数据-->     
                <div id="data">            
                    <table id="datalist">
                        <tr>
                            <th class="width150">客户登录 IP</th>
                            <th class="width150">登入时刻</th>
                            <th class="width150">登出时刻</th>
                            <th class="width100">时长（秒）</th>
                            <th class="width150">费用</th>
                            <th>资费</th>
                        </tr>
                        <s:iterator value="serviceDetails">
                        <tr>
                            <td>${clientHost}</td>
                            <td><s:date name="loginTime" format="yyyy/MM/dd HH:mm:ss"/></td>
                            <td><s:date name="logoutTime" format="yyyy/MM/dd HH:mm:ss"/></td>
                            <td>${duration}</td>
                            <td>${cost}</td>
                            <td>${costName}</td>
                        </tr>
                        </s:iterator>
                    </table>
                </div>
                <!--分页-->
                <div id="pages">
        	        <s:if test="page>1">
        	        <a href="?itemId=${itemId}&billId=${billId}&page=${page-1}">上一页</a>
        	        </s:if><s:else><a>上一页</a></s:else>
        	        <s:iterator begin="1" end="pageCount" var="i">
                    <a href="?itemId=${itemId}&billId=${billId}&page=${i}" <s:if test="page==#i">class="current_page"</s:if> >${i}</a>
                 </s:iterator>
                 <s:if test="page<pageCount">
        	        <a href="?itemId=${itemId}&billId=${billId}&page=${page+1}">下一页</a>
        	        </s:if><s:else><a>下一页</a></s:else>
                </div>                    
            </form>
        </div>
        
        <%@include file="../common/bottom.jsp"%> 
    </body>
</html>
